<template>
  <div class="radar" ref="myDivRef"></div>
</template>

<script>
// 引入全部echarts
// import * as echarts from 'echarts'
var echarts = require('echarts/lib/echarts') // 引入echarts主模块
require('echarts/lib/chart/radar') // 引入雷达图
// 引入提示框和标题组件
require('echarts/lib/component/tooltip')
require('echarts/lib/component/legend')

export default {
  name: '',
  mounted() {
    const myChart = echarts.init(this.$refs.myDivRef)
    myChart.setOption({
      legend: {
        data: []
      },
      radar: {
        radius: '65%',
        splitNumber: 4,
        indicator: [
          { name: '逻辑思维', max: 100 },
          { name: '项目相关', max: 100 },
          { name: '基础知识', max: 100 },
          { name: '理论基础', max: 100 },
          { name: '高阶技术', max: 100 }
        ],
        splitArea: {
          show: true,
          areaStyle: {
            color: ['#c8bfca']
          }
        }
      },
      splitLine: {
        show: true,
        lineStyle: {
          color: [
            'rgba(108, 254, 255, 0)',
            'rgba(108, 254, 255, 0.30196078431372547)',
            'rgba(108, 254, 255, 0.30196078431372547)',
            'rgba(108, 254, 255, 0.30196078431372547)'
          ],
          width: '1'
        }
      },
      series: [
        {
          type: 'radar',
          data: [
            {
              value: [65, 70, 70, 75, 75]
            }
          ],
          symbolSize: 0,
          areaStyle: {
            color: '#32dadd'
          },
          lineStyle: {
            normal: {
              color: ''
            }
          }
        }
      ]
    })
  }
}
</script>
<style lang="scss" scoped>
.radar {
  width: 253px;
  height: 160px;
}
</style>
